How to get the dark power from ISeq
VM 用の命令シーケンス
.rb -> parse, compile -> ISeq -> Ruby VM
中間表現
code:ruby
irb(main):006:0> RubyVM::InstructionSequence.compile('a=1+2').to_s
=> "#<RubyVM::InstructionSequence:0x00007f9d76165ee8>"
irb(main):007:0> RubyVM::InstructionSequence.compile('a=1+2').disasm
=> "== disasm: #<ISeq:<compiled>@<compiled>:1 (1,0)-(1,5)>==================\nlocal table (size: 1, argc: 0 opts: 0, rest: -1, post: 0, block: -1, kw: -1@-1, kwrest: -1)\n 1 a \n0000 putobject_OP_INT2FIX_O_1_C_ ( 1)Li\n0001 putobject 2\n0003 opt_plus <callinfo!mid:+, argc:1, ARGS_SIMPLE>, <callcache>\n0006 dup \n0007 setlocal_OP__WC__0 a\n0009 leave \n"